﻿using MongoDB.Driver;
using SDCloudSolution.SDCloud.DataLayer.MongoDb.Interfaces;

namespace SDCloudSolution.SDCloud.DataLayer.MongoDb
{
    public class BaseMongoDataProvider
    {
        private readonly ISdcloudMongoClient _client;

        private readonly string _databaseName;

        public BaseMongoDataProvider(ISdcloudMongoClient client, string databaseName)
        {
            _client = client;
            _databaseName = databaseName;
        }

        protected IMongoDatabase GetDatabase()
        {
            return _client.GetDatabase(_databaseName);
        }
    }
}
